/****************************************************************************************
**  File: Math.hpp
**  Author: Asteroth
**  Date: 03/01/2010
****************************************************************************************/

#ifndef __ZEN_MATH__
#define __ZEN_MATH__

#include <glm/glm.hpp>
#include <boost/lexical_cast.hpp>

namespace zen {
namespace math {

class Math {
public:
	template <class T>
	static inline std::string str(const glm::detail::tmat4x4<T> &m) {
        return "(" + boost::lexical_cast<std::string>(m[0][0]) + ", " + boost::lexical_cast<std::string>(m[0][1]) + ", " + boost::lexical_cast<std::string>(m[0][2]) + ", " + boost::lexical_cast<std::string>(m[0][3]) + ", "
                + boost::lexical_cast<std::string>(m[1][0]) + ", " + boost::lexical_cast<std::string>(m[1][1]) + ", " + boost::lexical_cast<std::string>(m[1][2]) + ", " + boost::lexical_cast<std::string>(m[1][3]) + ", "
                + boost::lexical_cast<std::string>(m[2][0]) + ", " + boost::lexical_cast<std::string>(m[2][1]) + ", " + boost::lexical_cast<std::string>(m[2][2]) + ", " + boost::lexical_cast<std::string>(m[2][3]) + ", "
                + boost::lexical_cast<std::string>(m[3][0]) + ", " + boost::lexical_cast<std::string>(m[3][1]) + ", " + boost::lexical_cast<std::string>(m[3][2]) + ", " + boost::lexical_cast<std::string>(m[3][3]) + ")";
	}
	template <class T>
	static inline std::string str(const glm::detail::tvec3<T> &v) {
        return "(" + boost::lexical_cast<std::string>(v.x) + ", " + boost::lexical_cast<std::string>(v.y) + ", " + boost::lexical_cast<std::string>(v.z) + ")";
	}
	template <class T>
	static inline std::string str(const glm::detail::tvec4<T> &v) {
        return "(" + boost::lexical_cast<std::string>(v.x) + ", " + boost::lexical_cast<std::string>(v.y) + ", " + boost::lexical_cast<std::string>(v.z) + ", " + boost::lexical_cast<std::string>(v.w) + ")";
	}
};

} // namespace math
} // namespace zen

#endif
